package com.yi.wood.dao;

import com.yi.wood.entity.Goods;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaRepository;

/**
 * Created by moyi on 2019/1/30 14:11
 *
 * @author moyi
 */
public interface GoodsDao extends JpaRepository<Goods,Long> {

    /**
     * 组装sql查询商品列表
     * @param goodsSpecification 查询条件
     * @param pageable 分页
     * @return 商品列表
     */
    Page<Goods> findAll(Specification<Goods> goodsSpecification, Pageable pageable);
}
